package com.sino.androiddesign.customView

import android.content.Context
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter

class PageAdapter : FragmentPagerAdapter{

    override fun getItem(position: Int): Fragment {
        return this.fragList!![position]
    }

    override fun getCount(): Int {
        return  this.strList!!.size
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return this.strList!![position]
    }

    private var context:Context?=null
    private var fragList:ArrayList<Fragment>?=null
    private var strList:ArrayList<String>?=null


    constructor(fm:FragmentManager,context: Context,fragList:ArrayList<Fragment>,strList:ArrayList<String>):super(fm){
        this.context = context
        this.fragList = fragList
        this.strList = strList
    }
}